<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>登录 - 运维年度总结系统</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    <link href="/css/bootstrap-icons.css" rel="stylesheet">
    <style>
        .login-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
        }
        .login-box {
            width: 100%;
            max-width: 400px;
            padding: 2rem;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }
        .login-title {
            text-align: center;
            margin-bottom: 2rem;
            color: #182848;
        }
        .login-form .form-control {
            height: 48px;
            font-size: 1rem;
            border-radius: 24px;
            padding: 0.5rem 1.5rem;
        }
        .login-form .btn {
            height: 48px;
            font-size: 1rem;
            border-radius: 24px;
        }
        .error-message {
            color: #dc3545;
            font-size: 0.9rem;
            margin-top: 1rem;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-box">
            <div class="login-title">
                <h2>运维年度总结系统</h2>
                <p class="text-muted">请登录以继续</p>
            </div>
            
            <form class="login-form" th:action="@{/login}" method="post">
                <div class="mb-4">
                    <div class="input-group">
                        <span class="input-group-text bg-transparent border-end-0">
                            <i class="bi bi-person"></i>
                        </span>
                        <input type="text" class="form-control border-start-0" 
                               name="username" placeholder="用户名" required>
                    </div>
                </div>
                
                <div class="mb-4">
                    <div class="input-group">
                        <span class="input-group-text bg-transparent border-end-0">
                            <i class="bi bi-lock"></i>
                        </span>
                        <input type="password" class="form-control border-start-0" 
                               name="password" placeholder="密码" required>
                    </div>
                </div>

                <div class="d-grid">
                    <button type="submit" class="btn btn-primary">
                        登录
                    </button>
                </div>

                <div th:if="${param.error}" class="error-message">
                    用户名或密码错误
                </div>
                
                <div th:if="${param.logout}" class="error-message text-success">
                    您已成功退出登录
                </div>
            </form>
        </div>
    </div>
</body>
</html> 